package com.example.pictureManage;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.stage.Stage;
//import javax.swing.d

import java.io.IOException;

public class Application extends javafx.application.Application {
    @Override
    public void start(Stage stage) throws IOException {
        // 以下为夹带私货行为，不影响程序整体运行
        Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
        alert.setHeaderText(null);
        alert.setContentText("Ciallo～(∠・ω< )⌒★");
        alert.showAndWait();

        if (alert.getResult() == ButtonType.OK) {
            FXMLLoader fxmlLoader = new FXMLLoader(Application.class.getResource("init-main-view.fxml"));

            Scene scene = new Scene(fxmlLoader.load());

//            stage.setMaximized(true);
            stage.setTitle("电子图片查看程序");
            stage.setScene(scene);
            stage.setWidth(1000);
            stage.setHeight(800);
            stage.show();
//            stage.setMaxWidth();
        }
        else {
            alert.setContentText("为什么点取消,不给你用了");
            alert.showAndWait();
        }
    }

    public static void main(String[] args) {
        launch();
    }
}